from .celery import app
from libs.tx_send_sms.sms import sms_msg


@app.task
def send_sms(mobile, code):
    res = sms_msg(mobile, code)
    if res:
        return '%s的短信发送成功，验证码是%s' % (mobile, code)
    else:
        return '%s的短信发送失败' % mobile
